#ifndef __SONYSTREAM_H_
#define __SONYSTREAM_H_
#include "SonyParser.h"

class CSonyStream : public J_BaseVideoStream<J_MediaStream>
{
public:
	CSonyStream(void *pTCPSocket, std::string resid);
	~CSonyStream();

public:
	///J_VideoStream
	virtual int Startup();
	virtual int Shutdown();

private:
	static void *WorkThread(void *param)
	{
		(static_cast<CSonyStream *>(param))->OnWork();
		return (void *)0;
	}
	void OnWork();

private:
	pthread_t m_recvThread;
	bool m_bStartup;
	char *m_pRecvBuff;//[100 * 1024];
	void *m_pTCPSocket;

	CSonyParser m_parser;
	std::string m_resid;
};

#endif //~__SONYSTREAM_H_
